<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改志愿者顾问信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-adviser-edit" th:object="${vtspAdviser}">
            <input name="adviserId" th:field="*{adviserId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问编号：</label>
                <div class="col-sm-8">
                    <input name="adviserCode" th:field="*{adviserCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问姓名：</label>
                <div class="col-sm-8">
                    <input name="adviserName" th:field="*{adviserName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问职务：</label>
                <div class="col-sm-8">
                    <input name="adviserJob" th:field="*{adviserJob}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问职称：</label>
                <div class="col-sm-8">
                    <input name="adviserTitle" th:field="*{adviserTitle}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问生日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="adviserBirthday" th:value="${#dates.format(vtspAdviser.adviserBirthday, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位名称：</label>
                <div class="col-sm-8">
                    <input name="workplaceName" th:field="*{workplaceName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">顾问学历：</label>
                <div class="col-sm-8">
                    <input name="adviserDegree" th:field="*{adviserDegree}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在地：</label>
                <div class="col-sm-8">
                    <input name="volunteerArea" th:field="*{volunteerArea}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在地ID：</label>
                <div class="col-sm-8">
                    <input name="volunteerAreaid" th:field="*{volunteerAreaid}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <input name="memberState" th:field="*{memberState}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="memo" class="form-control">[[*{memo}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "vtsp/adviser";
        $("#form-adviser-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-adviser-edit').serialize());
            }
        }

        $("input[name='adviserBirthday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>